From: bors Date: Thu, 21 Sep 2017 15:26:09 +0000 (+0000) Subject: Auto merge of #4515 - lukaslueg:issue1006, r=alexcrichton X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~6^2~46 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=a5b734d92541b1f246555287c5158c777ca2cb28;p=cargo.git Auto merge of #4515 - lukaslueg:issue1006, r=alexcrichton Improve message for multiple links to native lib Proposal for a fix to #1006, as advertised in my comment; as discussed briefly with alexcrichton on IRC. In case multiple packages link to the same library, the error message is now > error: More than one package links to native library `a`, which can only be linked once. > > Package a-sys v0.5.0 (file:///home/lukas/dev/issue1006test/a) links to native library `a`. > (Dependency via foo v0.5.0 (file:///home/lukas/dev/issue1006test)) > > Package b-sys v0.5.0 (file:///home/lukas/dev/issue1006test/a/b) also links to native library `a`. > (Dependency via a-sys v0.5.0 (file:///home/lukas/dev/issue1006test/a) => foo v0.5.0 (file:///home/lukas/dev/issue1006test)) > > Try updating or pinning your dependencies to ensure that native library `a` is only linked once. > In case the root-package itself is an offender: > Package foo v0.5.0 (file:///home/lukas/dev/issue1006test) links to native library `a`. > (This is the root-package) > IMHO the wording is much clearer now (the term "native library" and "package" are repeated on purpose); printing the whole dependency-chain from the offending package up to the root allows the user to at least figure out where the native library actually comes in. Added a unit-test, which all pass. Please scrutinize this carefully, it's my first PR for cargo. --- a5b734d92541b1f246555287c5158c777ca2cb28